package cn.kinoko.controller.manga;

import cn.kinoko.common.base.model.BaseController;
import cn.kinoko.model.manga.constant.ProcTaskType;
import cn.kinoko.service.manga.MangaProcTaskService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author kinoko
 * @date 2024/8/19 10:16
 */
@RestController
@RequestMapping("/manga/procTask")
public class MangaProcTaskController extends BaseController {

    @Resource
    private MangaProcTaskService mangaProcTaskService;

    @GetMapping("/markApply")
    public Object markApply(@RequestParam Long epId) {
        return success(mangaProcTaskService.submitTask(epId, ProcTaskType.MARK));
    }

    @GetMapping("/cutoutApply")
    public Object cutoutApply(@RequestParam Long epId) {
        return success(mangaProcTaskService.submitTask(epId, ProcTaskType.CUTOUT));
    }

}